home *** CD-ROM | disk | FTP | other *** search
/ Rockford Magazine / Rockford_Magazine_022_19xx_-_de_Disk_1_of_4_Side_A.d64 / seq file reader (.txt) < prev   
Commodore BASIC  |  2023-02-26  |  2KB  |  76 lines

  1. 100 poke53280,14:poke53281,13:printchr$(142)"[147][144]"tab(12)"sequential file"
  2. 105 printtab(12)"reader/printer":printtab(18)"by"
  3. 110 printtab(13)"roger b. fry":forx=1to2000:next
  4. 115 print"[147]"chr$(14)"options:[146]":print"f1 = directory"
  5. 120 print"f3 = screen only":print"f5 = hardcopy"
  6. 125 print"f7 = kill disk file"
  7. 130 getk$:ifk$=""ork$<chr$(133)ork$>chr$(136)then130
  8. 135 ifk$=chr$(136)then365
  9. 140 ifk$>chr$(133)then240
  10. 145 printchr$(142)"[147]directory[146]":print"f1 = screen only"
  11. 150 print"f3 = hardcopy":print"f5 = cancel function":p=0
  12. 155 getk$:ifk$=""ork$<chr$(133)ork$>chr$(135)then155
  13. 160 ifk$=chr$(135)then115
  14. 165 ifk$=chr$(133)then175
  15. 170 open4,4:print#4:print#4,chr$(14)"directory"chr$(15):print#4:print#4:p=1
  16. 175 print"[147]directory[146]":print:print:open1,8,0,"$0":get#1,a$,b$:n$=chr$(0)
  17. 180 get#1,a$,b$:ifb$=""then220
  18. 185 get#1,a$,b$:printasc(a$+n$)+256*asc(b$+n$);
  19. 190 ifp=1thenprint#4,asc(a$+n$)+256*asc(b$+n$);
  20. 195 get#1,a$:ifa$=""then210
  21. 200 ifp=1thenprint#4,a$;
  22. 205 printa$;:goto195
  23. 210 print:ifp=1thenprint#4
  24. 215 goto180
  25. 220 ifp=1thenforx=1to7:print#4:nextx:p=0
  26. 225 print:print"press any key to continue.":close1:close4
  27. 230 getk$:ifk$=""then230
  28. 235 goto115
  29. 240 open1,4,7:l=1:p=0:ifk$=chr$(135)thenp=1
  30. 245 print"[147][201] need a filename:[146] ";:inputf$
  31. 250 open8,8,8,f$+",s,r":gosub440
  32. 255 print"[147]press any key to pause[146]"
  33. 260 print:print:printtab(10)""f$"[146]":print:print
  34. 265 ifp=1thenprint#1,chr$(145)chr$(14)f$chr$(15)chr$(17):print#1:print#1:l=4
  35. 270 get#8,ch$:poke212,0:ifst=0then280
  36. 275 ifst=64then340
  37. 280 printch$"[144]";
  38. 285 ifp=1thenprint#1,ch$;:ifch$=chr$(13)thenl=l+1:gosub455
  39. 290 getk$:ifk$=""then270
  40. 295 print:forx=1to39:print"*";:nextx:print:print"pause is in effect[146]"
  41. 300 print"options:":print"f1 = printer on":print"f3 = printer off"
  42. 305 print"f5 = abort operation":print"f7 = continue unchanged"
  43. 310 getk$:ifk$<chr$(133)ork$>chr$(136)then310
  44. 315 ifk$=chr$(133)thenp=1:print#1,chr$(17):print#1:print#1:l=3:goto330
  45. 320 ifk$=chr$(134)thenp=0:goto330
  46. 325 ifk$=chr$(135)then335
  47. 330 print"continuing[146]":forx=1to39:print"*";:next:print:goto270
  48. 335 print"[147]"tab(11)chr$(142)"operation aborted[146]"
  49. 340 ifp=1thenprint#1:forx=l+2to66:print#1:nextx:print#1,chr$(145)
  50. 345 close1:close8:print:print"do you wish to read":print"another file? (y/n)"
  51. 350 getk$:ifk$="y"thenclr:goto115
  52. 355 ifk$<>"n"then350
  53. 360 end
  54. 365 poke53280,2:poke53281,2:printchr$(142):gosub465
  55. 370 print"type in the filename to be scratched"
  56. 375 print"or press return to abort the function."
  57. 380 print"filename:[146]";:inputf$
  58. 385 iff$=""then410
  59. 390 gosub465:print"last chance!":print"do you really wish to kill"
  60. 395 print"the   "f$" [146]  file? (y/n)"
  61. 400 getk$:ifk$=""then400
  62. 405 ifk$="y"then415
  63. 410 poke53280,14:poke53281,13:print"[144]"chr$(14):goto335
  64. 415 gosub465:print"killing "f$
  65. 420 close15:open15,8,15:print#15,"s0:"+f$
  66. 425 forx=1to2000:nextx:close15
  67. 430 gosub465:print""f$" is now dead!!"
  68. 435 forx=1to2000:nextx:poke53280,14:poke53281,13:print"[144]"chr$(14):goto115
  69. 440 close15:open15,8,15:input#15,d,e$,f,g
  70. 445 ifd>0thenprint:print"there is a disk error":printd;e$;f;g:close15:goto345
  71. 450 return
  72. 455 ifl=60thenl=1:forx=1to7:print#1:nextx
  73. 460 return
  74. 465 print"[147]"tab(8)" kill function active [146]"
  75. 470 return
  76.